<!-- 逻辑 -->
<script setup lang="ts">
import { ref } from 'vue'

const rice = ref({
  name: '米饭',
  food: ['猪脚'],
  price: 50
})
const add = () => {
  rice.value.food.push('鸭腿')
}
</script>

<!-- 结构 -->
<template>
  <h1 @click="add">{{ rice }}</h1>
</template>

<!-- 样式 -->
<style scoped></style>
